package plgnet

import (
	"dgo/MyProj/PrjHttpUtils"
	"dgo/goutils/utils"
	"gitee.com/ymofen/supervalue"
)

func (this *PlgHttpWsService) OnHttpStatus(rec *PlgHttpRec) (rval interface{}, errcode int, err error) {
	json := wrapper.NewSVObject()
	json.SetKeyValue("now", utils.NowString())
	json.SetKeyValue("online-cnt", this.online)
	json.SetKeyValue("service-url", this.serviceUrl)
	json.SetKeyValue("recv-info", this.monitor_recv.Info())
	json.SetKeyValue("send-info", this.monitor_send.Info())
	json.SetKeyValue("workers", this.workers.StatusSimpleString())
	PrjHttpUtils.JSON2TableRec(rec.RespW, "", json.String())
	return
}
